Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add dimension label and percent of total to charts #3672

Merged
merged 9 commits into from
Dec 14, 2023

Conversation

djbarnwal
Copy link
Member

Checklist

  • Manual verification
  • Unit test coverage
  • E2E test coverage
  • Needs manual QA?

Summary

Issue addressed:

#3612

Details:

Chart label PRD

Steps to Verify

  1. Compare a dimension
  2. Hover over the values

@djbarnwal djbarnwal changed the title Add dimension label and percent of total to charts Feat: Add dimension label and percent of total to charts Dec 9, 2023
@ericpgreen2
Copy link
Contributor

It looks like we're missing a space between the dimension value and the measure value/context.

Both on the dashboard overview's time series chart:
image

And on the time dimension detail chart:
image

@ericpgreen2
Copy link
Contributor

When I select "no context column", I'd expect not to see the contextual label on the charts:
image

Comment on lines +300 to +304
font-feature-settings: "case" 0, "cpsp" 0, "dlig" 0, "frac" 0, "dnom" 0,
"numr" 0, "salt" 0, "subs" 0, "sups" 0, "tnum", "zero" 0, "ss01", "ss02" 0,
"ss03" 0, "ss04" 0, "cv01" 0, "cv02" 0, "cv03" 0, "cv04" 0, "cv05" 0,
"cv06" 0, "cv07" 0, "cv08" 0, "cv09" 0, "cv10" 0, "cv11" 0, "calt", "ccmp",
"kern";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding a comment to explain the motivation here?

Comment on lines 12 to 13
export let validPercTotal;
export let hovered;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: types would be nice

const xScale = getContext(contexts.scale("x")) as ScaleStore;

let hovered: boolean | undefined = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: given hovered is initialized to false, it doesn't look like it'll ever be undefined?

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few fairly small/straightforward comments, so I'll approve for you to merge when ready

@djbarnwal djbarnwal merged commit 262459a into main Dec 14, 2023
2 checks passed
@djbarnwal djbarnwal deleted the feat/chart-labels branch December 14, 2023 00:27
mindspank pushed a commit that referenced this pull request Dec 18, 2023
* Show labels instantly for measure charts

* Add percTotal to dimension charts

* Show labels only for currently hovered chart

* Clean up

* Prettier fix

* Fix spacing, add types

* Show perc in label only when context column is percent

* Remove unused code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants